<template>
	<view class="main" :class="props.isScroll ? 'on' : ''">
		<image class="webp mb8" src="@/static/images/service.png" @click="openCustomerServiceChat" />
		<button class="share-btn" open-type="share">
			<image class="webp" src="@/static/images/share.png" />
		</button>
	</view>
</template>

<script setup lang="ts">
import { openCustomerServiceChat } from '@/utils/utils.ts';
const props = defineProps({
	isScroll: {
		type: Boolean,
		default: false,
	},
});
</script>
<style lang="scss" scoped>
.main {
	display: flex;
	flex-direction: column;
	position: fixed;
	bottom: 328rpx;
	right: 26rpx;
	transition: all 0.5s;

	.webp {
		width: 108rpx;
		height: 108rpx;
	}

	.share-btn {
		width: 108rpx;
		height: 108rpx;
		border: none;
		background: none;
		margin: 0;
		padding: 0;
	}

	.share-btn::after {
		content: none;
	}
}

.main.on {
	right: -100rpx;
}
</style>
